/* Copyright 2007-2008 dnAnalytics Project.
 *
 * Contributors to this file:
 * Patrick van der Velde
 *
 * This file is part of dnAnalytics.  dnAnalytics is licensed under the 
 * Microsoft Public License. See License.txt for a complete copy of the
 * license.
 */

using System;
using System.Runtime.Serialization;

namespace dnAnalytics.LinearAlgebra.Solvers.Iterative
{
    /// <summary>
    /// Exception class for exceptions thrown by the iterative solvers.
    /// </summary>
    [Serializable]
    public class IterativeSolverException : dnAnalyticsException
    {
        ///<summary>Initializes a new instance of the <b>IterativeSolverException </b> class.</summary>
        public IterativeSolverException()
            : base()
        { }

        ///<summary>Initializes a new instance of the <b>IterativeSolverException </b> class with a specified error message.</summary>
        ///<param name="message">The error message that explains the reason for the exception.</param>
        public IterativeSolverException(String message)
            : base(message)
        { }

        ///<summary>Initializes a new instance of the <b>IterativeSolverException </b> class with a specified error message 
        ///and a reference to the inner exception that is the cause of this exception.</summary>
        ///<param name="message">The error message that explains the reason for the exception.</param>
        ///<param name="inner">The exception that is the cause of the current exception. 
        ///If the innerException parameter is not a null reference, the current exception is raised in a <b>catch</b> block 
        ///that handles the inner exception.</param>
        public IterativeSolverException(String message, Exception inner)
            : base(message, inner)
        { }

        ///<summary>Initializes a new instance of the <b>IterativeSolverException </b> class with serialized data.</summary>
        ///<param name="info">The error message that explains the reason for the exception.</param>
        ///<param name="context">The error message that explains the reason for the exception.</param>
        protected IterativeSolverException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        { }
    }
}
